/**
 * All rights reserved by www.xmerge.cn
 */
package net.xfok.info.ifinance;

import net.xfok.rss.parser.Feed;
import android.net.Uri;
import android.provider.BaseColumns;

/**
 * @author YangHua
 *
 */
public class InfoItem extends Feed {
	public static final String AUTHORITY  = "net.xfok.info."+InfoConstant.INFO_TYPE+".InfoItem";
    public static final Uri CONTENT_URI  = Uri.parse("content://"+AUTHORITY+"/info");      
    public static final String INFO_DB_NAME=InfoConstant.INFO_TYPE+".db";
	public static final String INFO_TABLE_NAME="info";
	public static final String INFO_COLUMN_ID="_id";
	public static final String INFO_COLUMN_INFO_TITLE="info_title";
	public static final String INFO_COLUMN_INFO_ID="info_id";
	public static final String INFO_COLUMN_INFO_DATE="info_date";
	public static final String INFO_COLUMN_INFO_LINK="info_link";
	public static final String INFO_COLUMN_INFO_SUMMARY="info_summary";
	public static final String INFO_COLUMN_INFO_STATUS="info_status";
	public static final String COLUMNS[] = new String[] {
		INFO_COLUMN_ID,INFO_COLUMN_INFO_TITLE,INFO_COLUMN_INFO_ID,INFO_COLUMN_INFO_DATE,INFO_COLUMN_INFO_LINK,INFO_COLUMN_INFO_SUMMARY,INFO_COLUMN_INFO_STATUS};
	private int id;
	private int status;
	private String infoId;
	
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	public String getInfoId() {
		return infoId;
	}
	public void setInfoId(String infoId) {
		this.infoId = infoId;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	
	public InfoItem(){
		
	}
	
	public InfoItem(Feed feed){
		this(feed.getTitle(),feed.getSummary(),feed.getLink(),0);
	}
	
	public InfoItem(String title,String summary,String link,int status){
		this.setTitle(title);
		this.setSummary(summary);
		this.setLink(link);
		this.setStatus(status);
	}
	
	public InfoItem(int id,String title,String infoId,String date,String link,String summary,int status){
		this.id=id;
		this.setTitle(title);
		this.setInfoId(infoId);
		this.setPubDate(date);
		this.setLink(link);
		this.setSummary(summary);
		this.setStatus(status);
	}
}
